.class public Lcom/facebook/e/b/a;
.super Ljava/lang/Object;
.source "ThreadTrace.java"


# static fields
.field private static a:Ljava/lang/Class;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/lang/Class",
            "<*>;"
        }
    .end annotation
.end field

.field private static b:Ljava/util/concurrent/atomic/AtomicLong;


# instance fields
.field private c:J

.field private d:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lcom/facebook/e/b/d;",
            ">;"
        }
    .end annotation
.end field

.field private e:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map",
            "<",
            "Ljava/lang/Long;",
            "Lcom/facebook/e/b/d;",
            ">;"
        }
    .end annotation
.end field

.field private f:J

.field private g:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Lcom/facebook/e/b/c;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 23
    const-class v0, Lcom/facebook/e/b/a;

    sput-object v0, Lcom/facebook/e/b/a;->a:Ljava/lang/Class;

    .line 30
    new-instance v0, Ljava/util/concurrent/atomic/AtomicLong;

    invoke-direct {v0}, Ljava/util/concurrent/atomic/AtomicLong;-><init>()V

    sput-object v0, Lcom/facebook/e/b/a;->b:Ljava/util/concurrent/atomic/AtomicLong;

    return-void
.end method

.method public constructor <init>()V
    .locals 1

    .prologue
    .line 21
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 35
    invoke-static {}, Lcom/b/a/b/cv;->a()Ljava/util/ArrayList;

    move-result-object v0

    iput-object v0, p0, Lcom/facebook/e/b/a;->d:Ljava/util/List;

    .line 38
    invoke-static {}, Lcom/b/a/b/dh;->a()Ljava/util/HashMap;

    move-result-object v0

    iput-object v0, p0, Lcom/facebook/e/b/a;->e:Ljava/util/Map;

    .line 41
    invoke-static {}, Lcom/b/a/b/dh;->a()Ljava/util/HashMap;

    move-result-object v0

    iput-object v0, p0, Lcom/facebook/e/b/a;->g:Ljava/util/Map;

    .line 43
    return-void
.end method

.method private a(Ljava/util/List;)Ljava/lang/String;
    .locals 3
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List",
            "<",
            "Ljava/lang/String;",
            ">;)",
            "Ljava/lang/String;"
        }
    .end annotation

    .prologue
    .line 362
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    .line 363
    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :goto_0
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/String;

    .line 364
    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    goto :goto_0

    .line 366
    :cond_0
    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method private static a(Ljava/lang/StringBuilder;)V
    .locals 2
    .parameter

    .prologue
    const/4 v1, 0x0

    .line 376
    const/4 v0, 0x0

    invoke-static {p0, v0, v1, v1}, Lcom/facebook/e/b/a;->a(Ljava/lang/StringBuilder;ILjava/lang/String;Ljava/lang/String;)V

    .line 377
    return-void
.end method

.method private static a(Ljava/lang/StringBuilder;ILjava/lang/String;Ljava/lang/String;)V
    .locals 2
    .parameter
    .parameter
    .parameter
    .parameter

    .prologue
    .line 393
    const-string v0, "Thread trace:("

    invoke-virtual {p0, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, ")"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 394
    const/16 v0, 0xa

    if-ge p1, v0, :cond_1

    .line 395
    const-string v0, "    "

    invoke-virtual {p0, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 401
    :cond_0
    :goto_0
    const-string v0, "                 "

    invoke-virtual {p0, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 402
    invoke-static {p0, p2, p3}, Lcom/facebook/e/b/a;->a(Ljava/lang/StringBuilder;Ljava/lang/String;Ljava/lang/String;)V

    .line 403
    const-string v0, "\n"

    invoke-virtual {p0, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 411
    const-string v0, " .                   TOTAL   THREAD  "

    invoke-virtual {p0, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 412
    invoke-static {p0, p2, p3}, Lcom/facebook/e/b/a;->a(Ljava/lang/StringBuilder;Ljava/lang/String;Ljava/lang/String;)V

    .line 413
    const-string v0, "\n"

    invoke-virtual {p0, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 414
    return-void

    .line 396
    :cond_1
    const/16 v0, 0x64

    if-ge p1, v0, :cond_2

    .line 397
    const-string v0, "   "

    invoke-virtual {p0, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    goto :goto_0

    .line 398
    :cond_2
    const/16 v0, 0x3e8

    if-ge p1, v0, :cond_0

    .line 399
    const-string v0, "  "

    invoke-virtual {p0, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    goto :goto_0
.end method

.method static a(Ljava/lang/StringBuilder;Ljava/lang/String;Ljava/lang/String;)V
    .locals 11
    .parameter
    .parameter
    .parameter

    .prologue
    const/16 v10, 0x7c

    const/4 v4, 0x2

    const/4 v1, 0x0

    const/4 v3, 0x1

    .line 436
    if-eqz p1, :cond_0

    if-nez p2, :cond_1

    .line 474
    :cond_0
    return-void

    .line 445
    :cond_1
    invoke-virtual {p1}, Ljava/lang/String;->length()I

    move-result v0

    invoke-virtual {p2}, Ljava/lang/String;->length()I

    move-result v2

    invoke-static {v0, v2}, Ljava/lang/Math;->max(II)I

    move-result v8

    move v7, v1

    move v2, v1

    move v5, v1

    .line 446
    :goto_0
    if-ge v7, v8, :cond_0

    .line 449
    invoke-virtual {p1}, Ljava/lang/String;->length()I

    move-result v0

    if-ge v7, v0, :cond_a

    .line 450
    invoke-virtual {p1, v7}, Ljava/lang/String;->charAt(I)C

    move-result v0

    .line 452
    :goto_1
    invoke-virtual {p2}, Ljava/lang/String;->length()I

    move-result v6

    if-ge v7, v6, :cond_9

    .line 453
    invoke-virtual {p2, v7}, Ljava/lang/String;->charAt(I)C

    move-result v6

    .line 455
    :goto_2
    if-nez v5, :cond_6

    if-ne v0, v10, :cond_6

    move v5, v3

    .line 460
    :cond_2
    :goto_3
    if-nez v2, :cond_7

    if-ne v6, v10, :cond_7

    move v2, v3

    .line 466
    :cond_3
    :goto_4
    if-ne v5, v4, :cond_4

    if-eq v2, v4, :cond_0

    .line 468
    :cond_4
    if-ne v5, v3, :cond_8

    .line 469
    invoke-virtual {p0, v0}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    .line 446
    :cond_5
    :goto_5
    add-int/lit8 v0, v7, 0x1

    move v7, v0

    goto :goto_0

    .line 457
    :cond_6
    if-ne v5, v3, :cond_2

    invoke-static {v0}, Ljava/lang/Character;->isWhitespace(C)Z

    move-result v9

    if-nez v9, :cond_2

    if-eq v0, v10, :cond_2

    move v5, v4

    .line 458
    goto :goto_3

    .line 462
    :cond_7
    if-ne v2, v3, :cond_3

    invoke-static {v6}, Ljava/lang/Character;->isWhitespace(C)Z

    move-result v9

    if-nez v9, :cond_3

    if-eq v6, v10, :cond_3

    move v2, v4

    .line 463
    goto :goto_4

    .line 470
    :cond_8
    if-ne v2, v3, :cond_5

    .line 471
    invoke-virtual {p0, v6}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    goto :goto_5

    :cond_9
    move v6, v1

    goto :goto_2

    :cond_a
    move v0, v1

    goto :goto_1
.end method

.method private b(J)V
    .locals 2
    .parameter

    .prologue
    .line 113
    const-wide/32 v0, 0xf4240

    mul-long/2addr v0, p1

    iput-wide v0, p0, Lcom/facebook/e/b/a;->c:J

    .line 115
    invoke-direct {p0}, Lcom/facebook/e/b/a;->d()V

    .line 116
    invoke-direct {p0}, Lcom/facebook/e/b/a;->c()V

    .line 117
    invoke-static {}, Ljava/lang/System;->nanoTime()J

    move-result-wide v0

    iput-wide v0, p0, Lcom/facebook/e/b/a;->f:J

    .line 118
    iget-object v0, p0, Lcom/facebook/e/b/a;->g:Ljava/util/Map;

    invoke-interface {v0}, Ljava/util/Map;->clear()V

    .line 119
    return-void
.end method

.method private c()V
    .locals 2

    .prologue
    .line 123
    const/4 v0, 0x0

    move v1, v0

    :goto_0
    iget-object v0, p0, Lcom/facebook/e/b/a;->d:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    if-ge v1, v0, :cond_0

    .line 124
    iget-object v0, p0, Lcom/facebook/e/b/a;->d:Ljava/util/List;

    invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/facebook/e/b/d;

    invoke-virtual {v0}, Lcom/facebook/e/b/d;->a()V

    .line 123
    add-int/lit8 v0, v1, 0x1

    move v1, v0

    goto :goto_0

    .line 126
    :cond_0
    iget-object v0, p0, Lcom/facebook/e/b/a;->d:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->clear()V

    .line 127
    return-void
.end method

.method private d()V
    .locals 1

    .prologue
    .line 132
    iget-object v0, p0, Lcom/facebook/e/b/a;->e:Ljava/util/Map;

    invoke-interface {v0}, Ljava/util/Map;->clear()V

    .line 133
    return-void
.end method


# virtual methods
.method a(JJZ)J
    .locals 11
    .parameter
    .parameter
    .parameter

    .prologue
    .line 187
    invoke-static {}, Ljava/lang/System;->nanoTime()J

    move-result-wide v3

    .line 189
    if-nez p5, :cond_0

    .line 190
    iget-wide v0, p0, Lcom/facebook/e/b/a;->c:J

    move-wide v1, v0

    .line 195
    :goto_0
    iget-object v0, p0, Lcom/facebook/e/b/a;->e:Ljava/util/Map;

    invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v5

    invoke-interface {v0, v5}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    move-object v7, v0

    check-cast v7, Lcom/facebook/e/b/d;

    .line 196
    if-nez v7, :cond_1

    .line 197
    const-wide/16 v0, -0x1

    .line 232
    :goto_1
    return-wide v0

    .line 192
    :cond_0
    const-wide/32 v0, 0xf4240

    mul-long/2addr v0, p3

    move-wide v1, v0

    goto :goto_0

    .line 200
    :cond_1
    iget-object v0, p0, Lcom/facebook/e/b/a;->e:Ljava/util/Map;

    invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v5

    invoke-interface {v0, v5}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;

    .line 202
    invoke-virtual {v7}, Lcom/facebook/e/b/d;->e()Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_3

    .line 203
    invoke-virtual {v7}, Lcom/facebook/e/b/d;->e()Ljava/lang/String;

    move-result-object v5

    .line 204
    iget-object v0, p0, Lcom/facebook/e/b/a;->g:Ljava/util/Map;

    invoke-interface {v0, v5}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/facebook/e/b/c;

    .line 205
    if-nez v0, :cond_2

    .line 206
    new-instance v0, Lcom/facebook/e/b/c;

    const/4 v6, 0x0

    invoke-direct {v0, v6}, Lcom/facebook/e/b/c;-><init>(Lcom/facebook/e/b/b;)V

    .line 207
    iget-object v6, p0, Lcom/facebook/e/b/a;->g:Ljava/util/Map;

    invoke-interface {v6, v5, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 209
    :cond_2
    iget v5, v0, Lcom/facebook/e/b/c;->a:I

    add-int/lit8 v5, v5, 0x1

    iput v5, v0, Lcom/facebook/e/b/c;->a:I

    .line 210
    iget-wide v5, v0, Lcom/facebook/e/b/c;->b:J

    invoke-virtual {v7}, Lcom/facebook/e/b/d;->f()J

    move-result-wide v8

    sub-long v8, v3, v8

    add-long/2addr v5, v8

    iput-wide v5, v0, Lcom/facebook/e/b/c;->b:J

    .line 214
    :cond_3
    invoke-virtual {v7}, Lcom/facebook/e/b/d;->f()J

    move-result-wide v5

    sub-long v9, v3, v5

    .line 215
    cmp-long v0, v9, v1

    if-gez v0, :cond_6

    .line 216
    iget-object v0, p0, Lcom/facebook/e/b/a;->d:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    .line 217
    add-int/lit8 v0, v0, -0x1

    move v1, v0

    :goto_2
    if-ltz v1, :cond_4

    .line 218
    iget-object v0, p0, Lcom/facebook/e/b/a;->d:Ljava/util/List;

    invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/facebook/e/b/d;

    .line 219
    if-ne v0, v7, :cond_5

    .line 220
    iget-object v0, p0, Lcom/facebook/e/b/a;->d:Ljava/util/List;

    invoke-interface {v0, v1}, Ljava/util/List;->remove(I)Ljava/lang/Object;

    .line 221
    invoke-virtual {v7}, Lcom/facebook/e/b/d;->a()V

    :cond_4
    :goto_3
    move-wide v0, v9

    .line 232
    goto :goto_1

    .line 217
    :cond_5
    add-int/lit8 v0, v1, -0x1

    move v1, v0

    goto :goto_2

    .line 227
    :cond_6
    sget-object v0, Lcom/facebook/e/b/f;->b:Lcom/facebook/e/b/f;

    sget-object v1, Lcom/facebook/e/b/a;->b:Ljava/util/concurrent/atomic/AtomicLong;

    invoke-virtual {v1}, Ljava/util/concurrent/atomic/AtomicLong;->incrementAndGet()J

    move-result-wide v1

    invoke-virtual {v7}, Lcom/facebook/e/b/d;->d()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v7}, Lcom/facebook/e/b/d;->e()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v7}, Lcom/facebook/e/b/d;->f()J

    move-result-wide v5

    invoke-virtual {v7}, Lcom/facebook/e/b/d;->g()J

    move-result-wide v7

    invoke-static/range {v0 .. v8}, Lcom/facebook/e/b/d;->a(Lcom/facebook/e/b/f;JLjava/lang/String;Ljava/lang/String;JJ)Lcom/facebook/e/b/d;

    move-result-object v0

    .line 230
    iget-object v1, p0, Lcom/facebook/e/b/a;->d:Ljava/util/List;

    invoke-interface {v1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_3
.end method

.method a(Ljava/lang/String;Ljava/lang/String;)J
    .locals 9
    .parameter
    .parameter

    .prologue
    const-wide/16 v5, -0x1

    const/16 v3, 0x1f4

    .line 147
    iget-object v0, p0, Lcom/facebook/e/b/a;->e:Ljava/util/Map;

    invoke-interface {v0}, Ljava/util/Map;->size()I

    move-result v0

    .line 148
    iget-object v1, p0, Lcom/facebook/e/b/a;->d:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v1

    add-int/2addr v1, v0

    const/16 v2, 0x3e8

    if-le v1, v2, :cond_1

    .line 149
    sget-object v1, Lcom/facebook/e/b/a;->a:Ljava/lang/Class;

    const-string v2, "Giant thread trace. Clearing to avoid memory leak."

    invoke-static {v1, v2}, Lcom/facebook/e/a/a;->b(Ljava/lang/Class;Ljava/lang/String;)V

    .line 154
    iget-object v1, p0, Lcom/facebook/e/b/a;->d:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v1

    if-le v1, v3, :cond_0

    .line 155
    invoke-direct {p0}, Lcom/facebook/e/b/a;->c()V

    .line 161
    :cond_0
    if-le v0, v3, :cond_1

    .line 162
    invoke-direct {p0}, Lcom/facebook/e/b/a;->d()V

    .line 166
    :cond_1
    sget-object v0, Lcom/facebook/e/b/f;->a:Lcom/facebook/e/b/f;

    sget-object v1, Lcom/facebook/e/b/a;->b:Ljava/util/concurrent/atomic/AtomicLong;

    invoke-virtual {v1}, Ljava/util/concurrent/atomic/AtomicLong;->incrementAndGet()J

    move-result-wide v1

    move-object v3, p1

    move-object v4, p2

    move-wide v7, v5

    invoke-static/range {v0 .. v8}, Lcom/facebook/e/b/d;->a(Lcom/facebook/e/b/f;JLjava/lang/String;Ljava/lang/String;JJ)Lcom/facebook/e/b/d;

    move-result-object v0

    .line 168
    iget-object v1, p0, Lcom/facebook/e/b/a;->d:Ljava/util/List;

    invoke-interface {v1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 169
    iget-object v1, p0, Lcom/facebook/e/b/a;->e:Ljava/util/Map;

    invoke-virtual {v0}, Lcom/facebook/e/b/d;->b()J

    move-result-wide v2

    invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v2

    invoke-interface {v1, v2, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 170
    invoke-virtual {v0}, Lcom/facebook/e/b/d;->b()J

    move-result-wide v0

    return-wide v0
.end method

.method a()V
    .locals 2

    .prologue
    .line 62
    const-wide/16 v0, 0x0

    invoke-direct {p0, v0, v1}, Lcom/facebook/e/b/a;->b(J)V

    .line 63
    return-void
.end method

.method a(ILjava/lang/String;)V
    .locals 11
    .parameter
    .parameter

    .prologue
    const/16 v10, 0xfa0

    const/4 v5, 0x0

    const/4 v2, 0x0

    .line 66
    invoke-static {p1}, Lcom/facebook/e/a/a;->b(I)Z

    move-result v0

    if-eqz v0, :cond_4

    .line 67
    invoke-virtual {p0}, Lcom/facebook/e/b/a;->b()Ljava/lang/String;

    move-result-object v0

    .line 68
    invoke-static {v0}, Lcom/facebook/c/i/c;->a(Ljava/lang/CharSequence;)Z

    move-result v1

    if-nez v1, :cond_4

    .line 69
    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v1

    if-le v1, v10, :cond_5

    .line 70
    const-string v1, "\n"

    invoke-virtual {v0, v1}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v6

    .line 73
    new-instance v7, Ljava/lang/StringBuilder;

    invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V

    .line 74
    invoke-static {v7, v2, v5, v5}, Lcom/facebook/e/b/a;->a(Ljava/lang/StringBuilder;ILjava/lang/String;Ljava/lang/String;)V

    .line 75
    invoke-virtual {v7}, Ljava/lang/StringBuilder;->length()I

    move-result v0

    move v1, v2

    move v3, v2

    .line 76
    :goto_0
    array-length v4, v6

    if-ge v3, v4, :cond_3

    .line 77
    if-eqz v3, :cond_1

    add-int/lit8 v4, v3, -0x1

    aget-object v4, v6, v4

    .line 78
    :goto_1
    aget-object v8, v6, v3

    .line 79
    if-eqz v0, :cond_0

    invoke-virtual {v8}, Ljava/lang/String;->length()I

    move-result v9

    add-int/2addr v9, v0

    if-ge v9, v10, :cond_2

    .line 80
    :cond_0
    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 81
    const-string v4, "\n"

    invoke-virtual {v7, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 82
    invoke-virtual {v8}, Ljava/lang/String;->length()I

    move-result v4

    add-int/lit8 v4, v4, 0x1

    add-int/2addr v0, v4

    .line 83
    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    :cond_1
    move-object v4, v5

    .line 77
    goto :goto_1

    .line 85
    :cond_2
    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {p1, p2, v0}, Lcom/facebook/e/a/a;->a(ILjava/lang/String;Ljava/lang/String;)V

    .line 86
    invoke-virtual {v7, v2}, Ljava/lang/StringBuilder;->setLength(I)V

    .line 87
    add-int/lit8 v1, v1, 0x1

    .line 88
    invoke-static {v7, v1, v4, v8}, Lcom/facebook/e/b/a;->a(Ljava/lang/StringBuilder;ILjava/lang/String;Ljava/lang/String;)V

    .line 89
    invoke-virtual {v7}, Ljava/lang/StringBuilder;->length()I

    move-result v0

    goto :goto_0

    .line 92
    :cond_3
    if-lez v0, :cond_4

    .line 93
    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {p1, p2, v0}, Lcom/facebook/e/a/a;->a(ILjava/lang/String;Ljava/lang/String;)V

    .line 103
    :cond_4
    :goto_2
    invoke-virtual {p0}, Lcom/facebook/e/b/a;->a()V

    .line 104
    return-void

    .line 96
    :cond_5
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    .line 97
    invoke-static {v1}, Lcom/facebook/e/b/a;->a(Ljava/lang/StringBuilder;)V

    .line 98
    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 99
    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {p1, p2, v0}, Lcom/facebook/e/a/a;->a(ILjava/lang/String;Ljava/lang/String;)V

    goto :goto_2
.end method

.method a(J)V
    .locals 0
    .parameter

    .prologue
    .line 55
    invoke-direct {p0, p1, p2}, Lcom/facebook/e/b/a;->b(J)V

    .line 56
    return-void
.end method

.method a(Ljava/lang/String;)V
    .locals 9
    .parameter

    .prologue
    const-wide/16 v5, -0x1

    .line 257
    sget-object v0, Lcom/facebook/e/b/f;->c:Lcom/facebook/e/b/f;

    sget-object v1, Lcom/facebook/e/b/a;->b:Ljava/util/concurrent/atomic/AtomicLong;

    invoke-virtual {v1}, Ljava/util/concurrent/atomic/AtomicLong;->incrementAndGet()J

    move-result-wide v1

    const/4 v4, 0x0

    move-object v3, p1

    move-wide v7, v5

    invoke-static/range {v0 .. v8}, Lcom/facebook/e/b/d;->a(Lcom/facebook/e/b/f;JLjava/lang/String;Ljava/lang/String;JJ)Lcom/facebook/e/b/d;

    move-result-object v0

    .line 259
    iget-object v1, p0, Lcom/facebook/e/b/a;->d:Ljava/util/List;

    invoke-interface {v1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 260
    return-void
.end method

.method b()Ljava/lang/String;
    .locals 1

    .prologue
    .line 282
    invoke-virtual {p0}, Lcom/facebook/e/b/a;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public toString()Ljava/lang/String;
    .locals 13

    .prologue
    const-wide/32 v11, 0xf4240

    .line 292
    new-instance v7, Ljava/lang/StringBuilder;

    invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V

    .line 293
    const-wide/16 v3, -0x1

    .line 295
    invoke-static {}, Ljava/lang/System;->nanoTime()J

    move-result-wide v8

    .line 296
    invoke-static {}, Lcom/b/a/b/cv;->b()Ljava/util/LinkedList;

    move-result-object v10

    .line 297
    const/4 v0, 0x0

    move v6, v0

    :goto_0
    iget-object v0, p0, Lcom/facebook/e/b/a;->d:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    if-ge v6, v0, :cond_4

    .line 298
    iget-object v0, p0, Lcom/facebook/e/b/a;->d:Ljava/util/List;

    invoke-interface {v0, v6}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/facebook/e/b/d;

    .line 301
    invoke-virtual {v0}, Lcom/facebook/e/b/d;->c()Lcom/facebook/e/b/f;

    move-result-object v1

    sget-object v2, Lcom/facebook/e/b/f;->d:Lcom/facebook/e/b/f;

    if-ne v1, v2, :cond_1

    .line 297
    :cond_0
    :goto_1
    add-int/lit8 v0, v6, 0x1

    move v6, v0

    goto :goto_0

    .line 305
    :cond_1
    invoke-virtual {v0}, Lcom/facebook/e/b/d;->c()Lcom/facebook/e/b/f;

    move-result-object v1

    sget-object v2, Lcom/facebook/e/b/f;->b:Lcom/facebook/e/b/f;

    if-ne v1, v2, :cond_2

    .line 306
    invoke-virtual {v10}, Ljava/util/LinkedList;->size()I

    move-result v1

    if-nez v1, :cond_3

    .line 307
    sget-object v1, Lcom/facebook/e/b/a;->a:Ljava/lang/Class;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v5, "Trace contains a stop event without a corresponding start: "

    invoke-virtual {v2, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    iget-object v5, p0, Lcom/facebook/e/b/a;->d:Ljava/util/List;

    invoke-virtual {v2, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Lcom/facebook/e/a/a;->c(Ljava/lang/Class;Ljava/lang/String;)V

    .line 312
    :cond_2
    :goto_2
    const-string v1, " "

    invoke-virtual {v7, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 313
    iget-wide v1, p0, Lcom/facebook/e/b/a;->f:J

    invoke-direct {p0, v10}, Lcom/facebook/e/b/a;->a(Ljava/util/List;)Ljava/lang/String;

    move-result-object v5

    invoke-virtual/range {v0 .. v5}, Lcom/facebook/e/b/d;->a(JJLjava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v7, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 314
    const-string v1, " "

    invoke-virtual {v7, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 315
    invoke-virtual {v0}, Lcom/facebook/e/b/d;->f()J

    move-result-wide v3

    .line 316
    const-string v1, "\n"

    invoke-virtual {v7, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 317
    invoke-virtual {v0}, Lcom/facebook/e/b/d;->c()Lcom/facebook/e/b/f;

    move-result-object v0

    sget-object v1, Lcom/facebook/e/b/f;->a:Lcom/facebook/e/b/f;

    if-ne v0, v1, :cond_0

    .line 318
    const-string v0, "|  "

    invoke-virtual {v10, v0}, Ljava/util/LinkedList;->add(Ljava/lang/Object;)Z

    goto :goto_1

    .line 309
    :cond_3
    invoke-virtual {v10}, Ljava/util/LinkedList;->removeFirst()Ljava/lang/Object;

    goto :goto_2

    .line 322
    :cond_4
    iget-object v0, p0, Lcom/facebook/e/b/a;->g:Ljava/util/Map;

    invoke-interface {v0}, Ljava/util/Map;->isEmpty()Z

    move-result v0

    if-nez v0, :cond_5

    .line 323
    iget-object v0, p0, Lcom/facebook/e/b/a;->g:Ljava/util/Map;

    invoke-interface {v0}, Ljava/util/Map;->entrySet()Ljava/util/Set;

    move-result-object v0

    invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :goto_3
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_5

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/util/Map$Entry;

    .line 324
    const-string v1, "  TOTAL "

    invoke-virtual {v7, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 325
    invoke-interface {v0}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/lang/String;

    invoke-virtual {v7, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 326
    const-string v1, " "

    invoke-virtual {v7, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 327
    invoke-interface {v0}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/facebook/e/b/c;

    iget v1, v1, Lcom/facebook/e/b/c;->a:I

    invoke-virtual {v7, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    .line 328
    const-string v1, " ("

    invoke-virtual {v7, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 329
    invoke-interface {v0}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/facebook/e/b/c;

    iget-wide v0, v0, Lcom/facebook/e/b/c;->b:J

    div-long/2addr v0, v11

    invoke-virtual {v7, v0, v1}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    .line 330
    const-string v0, " ms)"

    invoke-virtual {v7, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 331
    const-string v0, "\n"

    invoke-virtual {v7, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    goto :goto_3

    .line 335
    :cond_5
    iget-object v0, p0, Lcom/facebook/e/b/a;->e:Ljava/util/Map;

    invoke-interface {v0}, Ljava/util/Map;->size()I

    move-result v0

    if-eqz v0, :cond_6

    .line 336
    const-string v0, " Unstopped timers:\n"

    invoke-virtual {v7, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 337
    iget-object v0, p0, Lcom/facebook/e/b/a;->e:Ljava/util/Map;

    invoke-interface {v0}, Ljava/util/Map;->values()Ljava/util/Collection;

    move-result-object v0

    invoke-interface {v0}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;

    move-result-object v1

    :goto_4
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_6

    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/facebook/e/b/d;

    .line 338
    invoke-virtual {v0}, Lcom/facebook/e/b/d;->f()J

    move-result-wide v2

    .line 339
    const-string v4, "  "

    invoke-virtual {v7, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 340
    invoke-virtual {v7, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    .line 341
    const-string v0, " ("

    invoke-virtual {v7, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 342
    sub-long v4, v8, v2

    div-long/2addr v4, v11

    invoke-virtual {v7, v4, v5}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    .line 343
    const-string v0, " ms, started at "

    invoke-virtual {v7, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 344
    div-long/2addr v2, v11

    invoke-static {v2, v3}, Lcom/facebook/e/b/d;->b(J)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v7, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 345
    const-string v0, "\n"

    invoke-virtual {v7, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    goto :goto_4

    .line 349
    :cond_6
    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method
